#include "myobject.h"

MyObject::MyObject(QObject *parent) : QObject(parent)
{

}

//读属性值
QString MyObject::getName() const
{
    return m_name;
}

//对属性值进行写操作
void MyObject::setName(const QString &nme)
{
    if(nme != m_name)
    {
        m_name = nme;
        emit nameChange(nme);
    }
}

//重置属性的值
void MyObject::resetName()
{
    m_name = "wangdao";
}
